package kyssion.leetcode.util;

import java.util.List;

public class ShowUtil {
    public static <T> void showList(List<T> list,boolean n) {
        for (int a=0;a<list.size();a++) {
            if(n){
                System.out.println(list.get(a));
                System.out.println();
            }else{
                if(a==0){
                    System.out.println(list.get(a));
                }else{
                    System.out.println(" "+list.get(a));
                }
            }
        }
        System.out.println();
    }

    public static <T> void showArrObj(T[] ttt) {
        for (T t : ttt) {
            System.out.print(" " + t);
        }
        System.out.println();
    }

    public static void showArr(int[] ttt) {
        for (int a : ttt) {
            System.out.print(a + " ");
        }
        System.out.println();
    }

    public static void showArrarr(int[][] ttt) {
        for (int[] t : ttt) {
            showArr(t);
        }
        System.out.println();
    }

    public static void showArrarr(int[][][] ints, int i) {
        for (int a=0;a<ints.length;a++){
            for (int b=0;b<ints[a].length;b++){
                System.out.print(ints[a][b][i]+" ");
            }
            System.out.println();
        }
        System.out.println();
    }

    public static void showNode(ListNode listNode) {
        while(listNode!=null){
            System.out.println(listNode.val+" ");
            listNode = listNode.next;
        }
        System.out.println();
    }
}
